/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-03-05
 * Time: 16:04
 */
/*class Person {
    private Sting name;
    int age;
}

class Child extends Person{
    public String grade;

    public static void main(String[] args) {
        Person p = new Child();
        System.out.println(p.name);
    }
}*/

class B {
    public int Func() {
        System.out.print("B");
        return 0;
    }
}
class D extends B {
    @Override
    public int Func() {
        System.out.print("D");
        return 0;
    }
}
public class Test {
    public static void main(String[] args) {
        B a = new B();
        B b = new D();
        a.Func();//B
        b.Func();//D
    }
}